package com.qujoy.cloud.order.controller;

import com.qujoy.cloud.order.feign.UserFeignService;
import com.qujoy.cloud.order.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private UserFeignService userFeignService;

    @GetMapping("getUserInfo/{userID}")
    public User getUserInfo(@PathVariable("userID") Long userID) {
        return userFeignService.getByID(userID);
    }
}
